import request from '@/utils/request'

/// 查询标签列表
export const getListApi = (params) => {
    return request({
        url: '/questions',
        method: 'get',
        params: params
    })
}
/// 学科列表
export const xuekeApi = (params) => {
    return request({
        url: '/subjects/simple',
        method: 'get',
        params: params
    })
}
/// 目录列表
export const muluApi = (params) => {
    return request({
        url: '/directorys',
        method: 'get',
        params: params
    })
}
/// 标签列表
export const biaoqianApi = (params) => {
    return request({
        url: '/tags',
        method: 'get',
        params: params
    })
}
/// 删除
export const deleteApi = (id) => {
    return request({
        url: `/questions/${id}`,
        method: 'DELETE',
    })
}
/// 精选题库上下架
// export const selectedApi = (id,publishState) => {
//     return request({
//         url: `/questions/${id}/${publishState}`,
//         method: 'DELETE',
//     })
// }
/// 精选题库上下架
export const selectedApi = (id) => {
    return request({
        url: `/questions/choice/${id}/1`,
        method: 'PATCH',
    })
}

